<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/release', function () {
    return exec('git fetch --all  && git reset --hard origin/develop && git pull');
});


Route::get('/web-release', function () {
    return exec("cd /home/work/xianjichang_web &&  git fetch --all  && git reset --hard origin/develop");

});


Route::get('api/v1/image/{code}/{image?}', function ($code, $image = '') {

    $file = 'http://127.0.0.1:8002/' . $code;

    if ($image) {
        $file .= '/' . $image;
    }
    $file = file_get_contents($file);
    return response($file, 200, [
        'Content-Type' => 'image/png',
    ]);
});


Route::get('/test',function (){
    dd(config('custom.report_parks'));
});

Route::get('/sms', 'TestController@test');
